﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Diagnostics;

namespace WatiNCF.Automater.Controls
{
    public partial class StringEntryControl : BaseDataEntryControl
    {

        public StringEntryControl()
        {
            InitializeComponent();
        }

        public override void SetName(string name)
        {
            this.NameLabel.Text = name;
            object value = this.Adapter.GetValue();
            if (value != null)
            {
                this.ValueTextBox.Text = value.ToString();
            }
        }

        public override object GetValue()
        {
           return this.Adapter.SetValue(this.ValueTextBox.Text);
        }

        public override void SetFocus()
        {
            this.ValueTextBox.Focus();
        }
    }
}
